class A:
    def a(self):
        print('a')
    def b(self):
        print('b')

def out(self):
    print('out')

setattr(A, 'c', out)

a = A()
a.c()
